<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\EduActiveCourseSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '线下课程';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="edu-active-course-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Create Edu Active Course', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
//            'user_id',
            [
                'label' => '门店',
                'attribute' => 'dot.room_name',
            ],
//            'title',
            [
                'attribute' => 'title',
                'enableSorting' => false,
            ],
//            'price',
//            'price_desc:ntext',
            //'show_image:ntext',
            'label',
            'status',
            //'reason',
            //'style',
            //'check_time:datetime',
            //'create_time:datetime',
            //'end_time:datetime',
            //'sort',
            //'collect_count',
            //'collect_base',
            //'freight',
            //'image',
            //'start_time:datetime',
            //'class_time',
            //'update_time:datetime',
            //'class_image:ntext',
            //'code',
            //'parent_code',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
